<include file='./header' />
<meta http-equiv="Content-Type" content="text/html" charset="utf-8" />
<link rel="stylesheet" type="text/css" href="__ROOT__/css/zc.css"/>
<script type="text/javascript" src="__ROOT__/js/zc.js"></script>
<script type="text/javascript">
$(function() {
    
	onloadImg(".zc_body");
	$("#txtLoginName").blur(function(){checkLoginName(this,"#spanLoginName")});//手机号或邮箱格式判断
	$("#txtPassword").blur(function(){checkLoginPw(this,"#spanPassword")});//密码空值判断
	//提交登录 
	$("#btnLogin").click(function(){       
		submitForm();
	})
	$("#txtPassword").keydown(function(e){
		var curKey = e.which;
		if(curKey == 13){
			$("#btnLogin").click();
		return false;
		}
	});

	
});
/*提交验证*/
function submitForm(){
	if(!checkLoginName("#txtLoginName","#spanLoginName")){return false;}//手机号或邮箱格式判断
		if(!checkLoginPw("#txtPassword","#spanPassword")){return false;}//密码空值判断
		$("#divonload").show();
		$.ajax({  
			type: "post",  
			url: "__APP__/Uc/User/loginOP",
			dataType: 'json',
			data: {LoginName:$("#txtLoginName").val(),Password:$("#txtPassword").val()}, 
			beforeSend: function(XMLHttpRequest){
			},  
			error:function(){
                        alert('ajax error');
                    },
			success: function(json){				
				if(json.data > 0){
					window.location.href='../Main';
				}else{
					$("#divonload").hide();
					$("#spanLoginName").html("<i class='fa fa-times-circle'></i>" + json.info + "</span>").show();
				}
			} 
		})
}
</script>
</head>

<body>
<!--注册-->
<div class="main">
	<div class="zc_main">
    	<div class="zc_top">
        	<a href="__ROOT__/"><img src="__ROOT__/images/logo2.png" /></a>
        </div>
        <div class="zc_body">
        	<h1>用户登录</h1>
            <div class="zc_con">
                <p>
                    <label>手机</label>
                    <input name="txtLoginName" class="form-control w60p" placeholder="手机号码" type="text" id="txtLoginName"   />
                    <span class="notice_wrong" style="display:none" id="spanLoginName"></span>
                </p>                    
                <p>
                    <label>密码</label>
                    <input name="txtPassword" class="form-control w60p" placeholder="请输入密码" type="password" id="txtPassword"  />                        
                    <span class="notice_wrong" style="display:none" id="spanPassword"></span>
                </p>
                <p style="padding-left:20%;position:relative">
                    <input class="btn btn-danger" value="登 录" id="btnLogin" type="button" / >
                    <a href="reg" class="btn btn-success">注 册</a>
                    <a href="findpw" class="btn btn-warning">忘记密码</a>
                </p>
                <p class="invite_info" style="line-height: 1.5;margin-top: 30px;text-align:center;">7分钟理财网站华丽转身，全新出发，一切为您而变！ <br>
之前版本用户请重新注册见证我们的改变！ <br>如需查看之前版本数据，<a href="http://old.7min.com.cn" target="_blank">请点击这里>></a></p>

            </div>    
            
            
            <div class="clear"></div>
        </div>
        
        <!--加载中-->
        <div class="onload" style="display:none" id="divonload">
            <div>
            	<img src="__ROOT__/images/loadingPie.gif" />
            </div>
        </div>
    </div>
</div>
</body>
</html>
